package test1;

import school.Teacher;
import school.Student;
import school.Course;

public class TestCourseSystem {
    public static void main(String[] args) {
        // 1. 教师开课
        Teacher t1 = new Teacher("T001", "张教授", "男", "教授");
        Course c1 = t1.openCourse("C001", "Java高级编程", "实训楼A301", "周二10:00-12:00", 3);

        Teacher t2 = new Teacher("T002", "李讲师", "女", "讲师");
        Course c2 = t2.openCourse("C002", "软件测试", "教学楼B205", "周四14:00-16:00", 2);

        // 打印教师信息（调用新方法printInfo）
        System.out.println("=== 教师信息 ===");
        t1.printInfo(); // 替代t1.printWorksheet()
        t2.printInfo(); // 替代t2.printWorksheet()

        // 2. 学生选课/退课
        System.out.println("=== 学生选课流程 ===");
        Student s1 = new Student("S001", "王五", "男", 2023);
        s1.selectCourse(c1);
        s1.selectCourse(c2); // 测试冲突
        s1.printInfo(); // 打印学生信息

        Student s2 = new Student("S002", "赵六", "女", 2024);
        s2.selectCourse(c2);
        s2.dropCourse();
        s2.printInfo(); // 打印退课后信息
    }
}